﻿using S.Common.Enums.Archives;
using S.Common.helper;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace S.Common.EditWanderStateHelper
{
    public static class EditWanderState
    {
        public class WanderStateEditCommand
        {
            /// <summary>
            /// 可视耳号
            /// </summary>
            /// 
           
            public string? EarTag { get; set; }
            /// <summary>
            /// 流转繁殖状态
            /// </summary>
            public WanderReproductiveStateEnum? WanderReproductiveState { get; set; }
        }
        /// <summary>
        /// 修改流转状态
        /// </summary>
        /// <param name="t"></param>
        /// <returns>string</returns>
        public static  string EditWander(string EarTag,int WanderReproductiveState,string Gateway)
        {
          
            WanderStateEditCommand wander = new WanderStateEditCommand()
            {
                EarTag = EarTag,
                WanderReproductiveState=(WanderReproductiveStateEnum) WanderReproductiveState
            };
         
          
                // 生产环境的代码
                var result = HttpClientHelper.PutDataResponse(Gateway+"/achs/api/SheepFileModel/WanderStateEdit", wander);
         
          
          
            return result;
        }
        /// <summary>
        /// 批量修改流转状态
        /// </summary>
        public class WanderStateEditPLCommand
        {
            /// <summary>
            /// 可视耳号
            /// </summary>
            /// 

            public List<string> EarTag { get; set; }
            /// <summary>
            /// 流转繁殖状态
            /// </summary>
            public WanderReproductiveStateEnum? WanderReproductiveState { get; set; }
        }
        /// <summary>
        /// 批量修改流转状态
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        public static string EditWanderPL(List<string > EarTag,int WanderReproductiveState,string Gateway)
        {
         
            WanderStateEditPLCommand wanderStateEditPL = new WanderStateEditPLCommand()
            {
                EarTag = EarTag,
                WanderReproductiveState =(WanderReproductiveStateEnum) WanderReproductiveState,
            };
          
          
                // 生产环境的代码
               var  result = HttpClientHelper.PutDataResponse(Gateway+"/achs/api/SheepFileModel/WanderStateEditPL", wanderStateEditPL);
           
           
          
            return result;
        }
    }
}
